<div class="col-md-4 modal-grids">
  <div
    class="modal fade"
    id="<%=formId %>"
    tabindex="-1"
    role="dialog"
    aria-labelledby="exampleModalLabel"
  >
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button
            type="button"
            class="close"
            data-dismiss="modal"
            aria-label="Close"
          >
            <span aria-hidden="true">&times;</span>
          </button>
          <h4 class="modal-title" id="exampleModalLabel">保存项目</h4>
        </div>
        <div class="modal-body">
          <form action="<%=action  %>" method="post">
            <% if (dataItem?._id) { %>
              <div class="form-group">
                <label for="recipient-name" class="control-label"
                  >id:</label
                >
                <input
                  type="text"
                  class="form-control"
                  id="recipient-name"
                  name="id"
                  value='<%=dataItem?._id %>'
                />
              </div>
            <% } %>

            <div class="form-group">
              <label for="recipient-name" class="control-label"
                >项目名称:</label
              >
              <input
                type="text"
                class="form-control"
                id="recipient-name"
                name="name"
                value='<%=dataItem?.name %>'
              />
            </div>
            <div class="form-group">
              <label for="recipient-name" class="control-label"
                >项目logo:</label
              >
              <input
                type="text"
                class="form-control"
                id="recipient-name"
                name="logo"
                value='<%=dataItem?.logo %>'
              />
            </div>
            <div class="form-group">
              <label for="recipient-name" class="control-label"
                >项目类型:</label
              >
              <% if(dataItem?.type == 0) { %>
                <input
                    type="radio"
                    class="custom-control-input"
                    name="type"
                    value="0"
                    checked
                />
                <label>小程序</label>
                <input
                    type="radio"
                    class="custom-control-input"
                    name="type"
                    value="1"
                />
                <label>pc</label>
              <% } else { %>
                <input
                type="radio"
                class="custom-control-input"
                name="type"
                value="0"
       
            />
            <label>小程序</label>
            <input
                type="radio"
                class="custom-control-input"
                name="type"
                value="1"
                checked
            />
            <label>pc</label>
                 <% } %>
   
            </div>
            <div class="form-group">
              <label for="message-text" class="control-label">选择表单:</label>
              <select class="form-control" name="formId" >
                <% for (let i = 0; i < data.formAll.length; i++) {%> 
                    <% let item = data.formAll[i]; %>
                    <% if(item._id.toJSON() == dataItem?.form?._id.toJSON()) { %>
                        <option value="<%= item._id %>" selected><%= item.name %></option>
                    <% } else { %>
                        <option value="<%= item._id %>" ><%= item.name %></option>
                    <% } %>
                <% } %>
              </select>
            </div>
            <div class="form-group">
              <label for="message-text" class="control-label"
                >项目备说明:</label
              >
              <input
                class="form-control"
                id="message-text"
                name="desc"
                value='<%=dataItem?.desc %>'
              >
            </div>
            <div class="modal-footer">
              <button
                type="button"
                class="btn btn-default"
                data-dismiss="modal"
              >
                关闭
              </button>
              <button class="btn btn-primary" type="submit">保存</button>
            </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
